<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
    <link
    rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
  />
</head>
<style>
</style>
<body>
    <div id="app"></div>
</body>
<script>
    const app = Vue.createApp({
        data(){
            return{
                isshow: true
            }
        },
        methods:{
            guodu(){
                this.isshow = !this.isshow
            }
        },
        template:`
        <transition 
            enter-active-class="animate__animated animate__bounce"
            leave-active-class="animate__animated animate__backOutRight"
        >
            <div v-show="isshow" class="div01">出现和隐藏</div>
        </transition>
        <button @click="guodu()">按钮</button>`
    })
    app.mount("#app")
</script>
</html>